<?php
namespace Admin\Controller;
use Admin\Controller\AdminBaseController;
use Common\Model\TradeBuyModel;
use Common\Model\TradeSellModel;
class TradeController extends AdminBaseController{
    public function tradeBuyLog()
    {
	    if ($_GET['username']) {
           $username=I('username'); 
           $user=$this->findUserByUserName($username);
	       $where['user_id']=$user['id'];
	    }
        $list=TradeBuyModel::newSelf()->pagingList($where);
        $this->assign('list',$list);
        $this->display();
    }
    public function tradeSellLog()
    {
	    if ($_GET['username']) {
           $username=I('username'); 
           $user=$this->findUserByUserName($username);
	       $where['user_id']=$user['id'];
	    }
        $list=TradeSellModel::newSelf()->pagingList($where);
        $this->assign('list',$list);
        $this->display();
    }
}
